package org.yxt.springcloud.sentinel.blockhandler;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import org.yxt.springcloud.entities.CommonResult;

/**
 * 全局的sentinel限流自定义配置返回
 */
public class GlobalBlockHandler {

    /**
     * 默认一个统一的限流提示
     *
     * @param exception
     * @return
     */
    public static CommonResult defaultBlockHandler(BlockException exception) {
        return new CommonResult(0, "限流规则自定义配置");
    }
}
